/*
* Copyright (C) 2012-2014 qar
* License: http://www.gnu.org/licenses/gpl.html GPL version 2
*/

#ifndef COUNTER_H
#define COUNTER_H

#include <QtCore>

class Counter
{
public:
    // The size, in bytes, must be a multiple of 8.
    Counter(qint64 size);

    virtual ~Counter();

    QByteArray data() const;

    void init(QByteArray data);
    void init();

    QByteArray increment();

protected:
    QVector<quint64> words;
};

#endif // COUNTER_H
